<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .ball{
      position: relative;
      width: 100px;
      height: 100px;
      border-radius: 50px;
      background-color: skyblue;
      animation: run 5s ease infinite 0s;
    }
    /* 设置动画 */
    @keyframes run {
    0% {
      left: 0px;
      top: 0px;
    }
    25%{
      left: 500px;
      top: 0px;
    }
    50% {
      left: 500px;
      top: 500px;
    }
    75% {
      left: 0px;
      top: 500px;
    }
    100% {
      left: 0px;
      top: 0px;
    }
  }
  </style>
</head>
<body>
  <div class="ball"></div>
</body>
</html>